/** \brief File declaring adapter functions for multithreading.
 *
 * This file contains the declaration of helper functions to use together with
 * QtConcurent.
 *
 * @file Worker.hpp
 * @author Johan "Solo" Luisier
 * @date 2013/03/22
 */
#ifndef WORKER_HPP
#define WORKER_HPP

class Cell;

/** @brief Namespace for "worker" functions.
 *
 * This namespace gathers function to be used in the QtConcurrent context, like
 * adapters.
 *
 * @author Johan "Solo" Luisier
 * @date 2013/04/11
 */
namespace Worker
{
    /** @brief Function adapter for a container of pointer on Cell instances.
     *
     * This function is an adapter to use GridBase::Matrix as the sequence in
     * QtConcurent::map. It allows to use a pointer reference as the calling
     * instance for the Cell::computeFutureStatus method.
     *
     * @param[in,out] ptr pointer on the Cell instance.
     */
    void getFutureStatus( Cell*& ptr );
    /** @brief Function adapter for a container of pointer on Cell instances.
     *
     * This function is an adapter to use GridBase::Matrix as the sequence in
     * QtConcurent::map. It allows to use a pointer reference as the calling
     * instance for the Cell::evolve method.
     *
     * @param[in,out] ptr pointer on the Cell instance.
     */
    void evolveCell( Cell*& ptr );
}

#endif // WORKER_HPP
